home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d12 / c_lib.arc / FLCLOSE.C next >
Text File  |  1990-08-09  |  962b  |  38 lines

  1. /**
  2. *
  3. *  Name         flclose -- Close a file
  4. *
  5. *  Synopsis     ercode = flclose(handle);
  6. *               int  ercode       Returned DOS error code
  7. *               int  handle       Handle of file to close
  8. *
  9. *  Description  FLCLOSE closes the file associated with the specified
  10. *               file handle.  Unexpected results may occur if one of the
  11. *               reserved file handles (0 through 4) is closed.
  12. *
  13. *  Returns      ercode            DOS 2.0 function error return code
  14. *
  15. *  Version      1.0  (C)Copyright Blaise Computing Inc.  1983
  16. *
  17. **/
  18. struct dreg
  19. {
  20.   unsigned ax,bx,cx,dx,si,di,ds,es;
  21. };
  22. #define DOSREG  struct dreg
  23.  
  24. int flclose(handle)
  25. int handle;
  26. {
  27.  
  28.     DOSREG dos_reg;
  29.     int    utinit(),dos();
  30.  
  31.     utinit(&dos_reg);                  /* Initialize registers         */
  32.     dos_reg.ax = 0x3e00;               /* Function 3E                  */
  33.     dos_reg.bx = handle;
  34.  
  35.     return(dos(&dos_reg));
  36.  
  37. }
  38.